package com.levelup.cr.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.*;
import com.levelup.cr.client.ui.RepositoryTreeWidget;
import com.levelup.cr.client.ui.RepositoryWidget;

import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * Created with IntelliJ IDEA.
 * User: denis_zavadsky
 * Date: 9/24/13
 * Time: 6:52 PM
 * To change this template use File | Settings | File Templates.
 */
public class Client implements EntryPoint {
    private Logger logger = Logger.getLogger("EntryPoint");

    public void onModuleLoad() {
        GWT.setUncaughtExceptionHandler(new
            GWT.UncaughtExceptionHandler() {
                  public void onUncaughtException(Throwable e) {
                      logger.log(Level.SEVERE,"Ex caught!", e);
                  }
            });
        logger.log(Level.SEVERE,"onModuleLoad()");
        RepositoryTreeWidget widget = new RepositoryTreeWidget();
        RootPanel.get().add(widget);
    }
}
